﻿@model IReadOnlyList<Moonglade.Model.PostListItem>

@{
    ViewBag.TitlePrefix = $"All Posts in {ViewBag.ArchiveInfo}";
}

<h3>
    @ViewBag.TitlePrefix
</h3>
<hr />
<div>
    @if (!Model.Any())
    {
        <div class="alert alert-warning">
            No Posts
        </div>
    }
    else
    {
        foreach (var item in Model.OrderByDescending(s => s.PubDateUtc))
        {
            <partial name="_PostListItem" model="item" />
            <div class="mb-4 d-none d-md-block"></div>
            <hr class="d-none d-md-block" />
        }
    }
</div>